package com.ckv.qcm.controller;

import com.ckv.qcm.view.UI_MasterFrame;

public class GeneralController {

	private static GeneralController instance;
	private UserController userControl;
	private UI_MasterFrame masterFrame;
	private QuestionController questionControl;
	private ThemeController themeControl;
	private AnswerController answerControl;
	public boolean isConnected = false;

	public static GeneralController getInstance() {
		if (instance == null) {
			instance = new GeneralController();
		}
		return instance;
	}

	public void startup() {
		masterFrame = UI_MasterFrame.getInstance();
		masterFrame.setVisible(true);

	}

	public ThemeController getThemeControl() {
		return themeControl;
	}

	public QuestionController getQuestionControl() {
		return questionControl;
	}

	private GeneralController() {
		userControl = new UserController();
		themeControl = new ThemeController();
		questionControl = new QuestionController();
		answerControl = new AnswerController();
	}

	public UserController getUserControl() {
		return userControl;
	}

}
